package com.kcwl.carrier.infrastructure.repository.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kcwl.carrier.domain.condition.CarrierMapCondition;
import com.kcwl.carrier.domain.entity.CarrierMappingInfo;
import com.kcwl.carrier.infrastructure.repository.po.CarrierMappingPO;
import com.kcwl.carrier.interfaces.query.CarrierListQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CarrierMappingMapper extends BaseMapper<CarrierMappingPO> {

    /**
     * 解绑
     * @param id
     */
    void carrierUnbind(Long id);
    /**
     * 根据车辆相关条件和用户id查询映射信息
     */
    List<CarrierMappingPO> queryByVehicleParamAndUser(@Param("p") CarrierListQuery query);
    /**
     * 根据司机相关条件和用户id查询映射信息
     */
    List<CarrierMappingPO> queryByCarrierParamAndUser(@Param("p") CarrierListQuery query);

    IPage<CarrierMappingPO> queryMappingPageByCondition(Page<Object> objectPage,@Param("p")  CarrierMapCondition condition);
}
